package com.dream.wukong.common.core.interfaces.service;

import com.dream.wukong.common.core.interfaces.dao.BaseEntity;
import com.dream.wukong.common.core.interfaces.dao.IBaseDao;

import javax.annotation.Resource;
import java.io.Serializable;

/**
 * @Author: wuyichao
 * @Description:
 * @Date: Created in 11:07 2018/9/18.
 * @Modified:
 */
public class BaseService<T extends BaseEntity<PK>, PK extends Serializable> implements IBaseService<T, PK>{

    @Resource(name="jpaDao")
    public IBaseDao<T, PK> jpaDao;

    public void save(T entity){
        jpaDao.save(entity);
    }

    public void delete(T entity){
        jpaDao.delete(entity);
    }

    public void update(T entity){
        jpaDao.update(entity);
    }

}